package cool.taomu.toolkit.entity

import com.google.gson.Gson
import com.google.gson.reflect.TypeToken

class TaomuConfig {
	val String jsonValue;

	new(Object value) {
		this.jsonValue = new Gson().toJson(value);
	}

	def <T> get(Class<T> zlass) {
		return new Gson().fromJson(this.jsonValue, zlass);
	}

	def <T> get(TypeToken<T> zlass) {
		return new Gson().fromJson(this.jsonValue, zlass);
	}
}
